#!/bin/bash

yum remove git -y
wget --no-check-certificate https://www.kernel.org/pub/software/scm/git/git-2.8.4.tar.gz
tar -zxf git-2.8.4.tar.gz
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel -y
yum install  gcc perl-ExtUtils-MakeMaker -y
cd git-2.8.4
mkdir -p  /usr/local/git
make prefix=/usr/local/git all
make prefix=/usr/local/git install
echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/profile
source /etc/profile
git --version